]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell-app: Track the starting state correctly
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 16 Jul 2015 22:20:23 +0000 (15:20 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 16 Jul 2015 22:21:57 +0000 (15:21 -0700)
Apps that are starting might have uninteresting windows like splash
screens pop up and then go away (like LibreOffice), even when
startup-notification hasn't completed yet. In those cases, we don't
want to transition the app back to stopped -- it should remain in
the running state.

src/shell-app.c

index 9c03a4ad8a30e63c5a2c12956ef12ffd10646d2c..ca367b12e76b721b7dc03bd8db1e8f484ec9b722 100644 (file)
@@ -828,10 +828,13 @@ shell_app_sync_running_state (ShellApp *app)
 {
   g_return_if_fail (app->running_state != NULL);
 
-  if (app->running_state->interesting_windows == 0)
-    shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
-  else if (app->state != SHELL_APP_STATE_STARTING)
-    shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+  if (app->state != SHELL_APP_STATE_STARTING)
+    {
+      if (app->running_state->interesting_windows == 0)
+        shell_app_state_transition (app, SHELL_APP_STATE_STOPPED);
+      else
+        shell_app_state_transition (app, SHELL_APP_STATE_RUNNING);
+    }
 }